<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>登录</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <meta name="MobileOptimized" content="320">
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="${basePath}/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link href="${basePath}/plugins/layer/skin/layer.css" rel="stylesheet">
    <#--<link href="${basePath}/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css" rel="stylesheet" type="text/css">-->
    <#--<link href="${basePath}/plugins/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet" type="text/css">-->
    <!-- END PAGE LEVEL SCRIPTS -->
    <!-- BEGIN THEME STYLES -->
    <link href="${basePath}/css/style-metronic.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/css/style-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/css/plugins.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
    <link href="${basePath}/css/pages/login-soft.css" rel="stylesheet" type="text/css"/>
    <link href="${basePath}/css/custom.css" rel="stylesheet" type="text/css"/>
    <!-- END THEME STYLES -->
    <link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="login">
<!-- BEGIN LOGO -->
<div class="logo">
    <h1 class="logo-name">FOF</h1>
</div>
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<div class="content">
    <!-- BEGIN LOGIN FORM -->
    <div class="login-form" >
        <h3 class="form-title">欢迎使用FOF基金研究平台</h3>
        <div class="form-group">
            <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
            <label class="control-label visible-ie8 visible-ie9">用户名</label>
            <div class="input-icon">
                <i class="fa fa-user"></i>
                <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" name="name" id="name"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label visible-ie8 visible-ie9">密码</label>
            <div class="input-icon">
                <i class="fa fa-lock"></i>
                <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="密码" name="password" id="password"/>
            </div>
        </div>
        <div class="form-actions">
            <button  class="btn green pull-right" style="width: 100%;" onclick="submit();">
                登录 <i class="m-icon-swapright m-icon-white"></i>
            </button>
        </div>
    </div>
    <!-- END LOGIN FORM -->
</div>
<!-- END LOGIN -->
<!-- BEGIN COPYRIGHT -->
<div class="copyright">
    2017 &copy; fof 基金研究平台.
</div>
<!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
<script src="${basePath}/plugins/respond.min.js"></script>
<script src="${basePath}/plugins/excanvas.min.js"></script>
<![endif]-->
<script src="${basePath}/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/jquery.cookie.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
<script src="${basePath}/plugins/jquery.form.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="${basePath}/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
<script src="${basePath}/plugins/layer/layer.js"></script>
<#--<script type="text/javascript" src="${basePath}/plugins/bootstrap-modal/js/bootstrap-modalmanager.js"></script>-->
<#--<script type="text/javascript" src="${basePath}/plugins/bootstrap-modal/js/bootstrap-modal.js"></script>-->
<#--<script src="${basePath}/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>-->
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="${basePath}/scripts/app.js" type="text/javascript"></script>
<script src="${basePath}/scripts/login-soft.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
    jQuery(document).ready(function() {
        App.init();
        Login.init();
    });
</script>
<script>
    function submit() {
        var name = $('#name').val();
        var password = $('#password').val();
        if (!name || typeof (name) == "undefined" || name == "") {
            layer.alert("用户名不能为空！");
            return false;
        }
        if (!password || typeof (password) == "undefined" || password == "") {
            layer.alert("密码不能为空！");
            return false;
        }
        $.ajax({
            type: "post",
            async: false,
            url: '${basePath}/login.json',
            data: {
                name: name,
                password: password,
            },
            success: function (data) {
                if (data.result) {
                    location.href = "${basePath}/hechang/wellcome.htm";
                } else {
                    layer.alert(data.errors['fail_msg']);
                }
            }
        });
    }
    document.addEventListener("keyup",function (e){
        if(e.keyCode===13){
            submit();
        }
    },false);
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>